package com.yiban.demo.ShuoShuo.DAO;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yiban.demo.ShuoShuo.Entity.ShuoShuo;
import com.yiban.demo.ShuoShuo.Entity.TotalShuoShuo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

@Mapper
@Repository
public interface ShuoShuoMapper extends BaseMapper<ShuoShuo> {
    List<TotalShuoShuo> selectShuoShuo(@Param("shuoshuoIds") List<Integer> shuoshuoId);

    IPage<TotalShuoShuo> selectNewShuoShuo(Page<?> page);

    void batchUpdateStars(@Param("stars") Map<Integer, AtomicInteger> stars);
 }
